package stdio.costa.imoca.converter;

import java.util.List;

import stdio.costa.imoca.dto.ReceiverListDTO;
import stdio.costa.imoca.model.Receiver;

public class Receivers2ReceiverList {
	
	public static ReceiverListDTO convert(List<Receiver> receivers) {
		
		if(receivers == null){
			return new ReceiverListDTO();
		}
		
		ReceiverListDTO receiverList = new ReceiverListDTO();
		
		receiverList.setReceivers(receivers);
		
		receiverList.setTotalNumber(receivers.size());
		
		return receiverList;
		
	}
}
